/*
 * Copyright 2006-2023 ahtelit.com, All Rights Reserved.
 */

package com.telit.firecommand.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.telit.firecommand.entity.IotDevice;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;


/**
 * IotDeviceDAO
 *
 * @author yuezhuang
 * @since 2023-04-27
 */
@Repository
public interface IotDeviceDAO extends BaseMapper<IotDevice> {

    long count(@Param("districtCode") String districtCode, @Param("areaRecursion") boolean areaRecursion,
               @Param("networkStatus") Boolean networkStatus, @Param("name") String name);

    List<IotDevice> selectByCondition(@Param("districtCode") String districtCode,
                                      @Param("areaRecursion") boolean areaRecursion,
                                      @Param("networkStatus") Boolean networkStatus, @Param("name") String name,
                                      @Param("pageSize") Integer pageSize,
                                      @Param("offset") Integer offset);

}
